package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabInspectCompanyFeeitem;
import com.ysd.lis.request.lab.CompFeeDto;
import com.ysd.lis.request.lab.CompanyPageParam;
import com.ysd.lis.service.lab.LabInspectCompanyFeeitemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 通道号管理表 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-01-26
 */
@RestController
@RequestMapping("/lab/inspectCompFeeitem")
public class LabInspectCompanyFeeitemController extends BaseController {

    @Autowired
    private LabInspectCompanyFeeitemService labInspectCompanyFeeitemService;

    @ApiOperation("查询")
    @GetMapping("/findInspectCompanyFeeitemList")
    public Result findInspectCompanyFeeitemList(CompanyPageParam param){
        return labInspectCompanyFeeitemService.findInspectCompanyFeeitemList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addCompanyFeeitem")
    public Result addCompanyFeeitem(@RequestBody LabInspectCompanyFeeitem companyFeeitem){
        return  labInspectCompanyFeeitemService.addCompanyFeeitem(companyFeeitem);
    }

    @ApiOperation("修改")
    @PostMapping("/saveOrUpdateCompFeeitem")
    public Result saveOrUpdateCompFeeitem(@RequestBody CompFeeDto dto) {
        return labInspectCompanyFeeitemService.saveOrUpdateCompFeeitem(dto);
    }


    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteCompanyFeeList")
    public Result batchDeleteCompanyFeeList(@RequestBody CompFeeDto dto){
        return  labInspectCompanyFeeitemService.batchDeleteCompanyFeeList(dto);
    }

    @ApiOperation("查询")
    @GetMapping("/findFeeitemListByBarCodeAndInspectCompany")
    public Result findFeeitemListByBarCodeAndInspectCompany(CompanyPageParam param){
        return labInspectCompanyFeeitemService.findFeeitemListByBarCodeAndInspectCompany(param);
    }

}
